<!DOCTYPE html>
<html>
<head>
  <title>Depot</title>
  <%= stylesheet_link_tag 'scaffolds.css.scss' %>
  <%= javascript_include_tag "application" %>
  <%= stylesheet_link_tag '/stylesheets/depot', :media => "all" %>
  <%= csrf_meta_tags %>
</head>
<body id="store">
  <div id="banner">
    <%= form_tag store_path, :class => 'locale' do %>
      <%= select_tag 'set_locale',
        options_for_select(LANGUAGES, I18n.locale.to_s),
        :onchange => 'this.form.submit()'  %>
      <%= submit_tag 'submit' %>
      <%= javascript_tag "$$('.locale input').each(Element.hide)" %>
     <% end %>
    <%= image_tag("rails.png") %>
    <%= @page_title || t('.title') %>
  </div>
  <div id="columns">
    <div id="side">
      <div id="cart">
        <% if @cart %>
        <% hidden_div_if(@cart.line_items.empty?, :id => "cart") do %>
            <%= render @cart %>
          <% end %>
         <% end %>
      </div>
      <a herf="http://www...."><%= t('.home') %></a><br />
      <a herf="http://www..../faq"><%= t('.questions') %></a><br />
      <a herf="http://www..../news"><%= t('.news') %></a><br />
      <a herf="http://www..../contact"><%= t('.contact') %></a><br />

      <% if session[:user_id] %>
        <br />
        <%=link_to 'Orders',    orders_path    %><br />
        <%=link_to 'Products',  products_path  %><br />
        <%=link_to 'Users',     users_path     %><br />
        <br />
        <%= button_to 'Logout', logout_path, :method => :delete  %>
      <% end %>
    </div>
    <div id="main">
      <%= yield %>
    </div>
  </div>
</body>
</html>
